//
//  TableViewController.m
//  zhd-9-21
//
//  Created by Macmini on 16/9/27.
//  Copyright © 2016年 Macmini. All rights reserved.
//

#import "TableViewController.h"

@interface TableViewController ()

@end

@implementation TableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.estimatedRowHeight = 44;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (indexPath.row%2==0 ){
    
    UITableViewCell *cellone = [tableView dequeueReusableCellWithIdentifier:@"left"];
    return cellone;
                            }
    
    
    else{
    UITableViewCell *celltwo = [tableView dequeueReusableCellWithIdentifier:@"right"];
        return celltwo;
         }
   }
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
